#ifndef __GEODETIC2D__H
#define __GEODETIC2D__H

#include <algorithm>

namespace Core{

	struct Geodetic2D
	{
	public:
		Geodetic2D(const double longitude, const double latitude){
			_longitude = longitude;
			_latitude = latitude;
		}

		const double getLongitude()const { return this->_longitude; }
		const double getLatitude()const { return _latitude; }

		const bool EqualsEpsilonconst(const Geodetic2D &other, double epsilon)const {
			return (std::abs(_longitude - other.getLongitude()) <= epsilon &&
				std::abs(_latitude - other.getLatitude()) <= epsilon);
		}

		const bool Equals(const Geodetic2D &other)const {
			return _longitude == other.getLongitude() && _latitude == other.getLatitude();
		}

		const bool operator ==(const Geodetic2D &right){
			return this->Equals(right);
		}

		const bool operator !=(Geodetic2D &other){
			return !this->Equals(other);
		}

	private:
		double _longitude, _latitude;
	};
}
#endif